<template>
	<view class="edit-password">
		<uni-forms :modelValue="formData">
			<uni-forms-item label="原密码">
				<uni-easyinput v-model="formData.password" placeholder="请输入原密码"></uni-easyinput>
			</uni-forms-item>
			<uni-forms-item label="新密码">
				<uni-easyinput v-model="formData.newpassword" placeholder="请输入新密码"></uni-easyinput>
			</uni-forms-item>
		</uni-forms>
		<button type="default" @click="confirmEdit">确认修改</button>
	</view>
</template>

<script>
	import { EditPasswordAdmin } from '../../api/index.js'
	export default {
		data() {
			return {
				formData:{
					password:'',
					newpassword:''
				}
			};
		},
		methods:{
			async confirmEdit(){
				const {data:res} = await EditPasswordAdmin(this.formData)
				console.log(res,'editpwd')
			}
		}
	}
</script>

<style lang="scss">
.edit-password{
	padding:200rpx 60rpx;
	button{
		background: #1E90FF;
		color: #fff;
	}
}
</style>
